package com.luli.dao;

import com.luli.entity.Blood;
import com.luli.entity.UserData.UpdateUserParam;
import com.luli.entity.Users;
import com.luli.entity.login.RegisterUser;
import com.luli.entity.login.SysUsers;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 陆离
 * 2022/5/3 1:31:16
 */
@Mapper
@Repository
public interface UsersDao {
    public List<Users> findByAccount(String userName);

    public List<Users> findByUserAndSex(String userName, String sex);

    public List<Blood> getBloodData();

    public Integer deleteBloodData(String application);

    /**
     * Excel批量导入
     *
     * @return
     * @throws Exception
     */
    void addData(@Param("listData") List<Users> listData);

    /**
     * 登录
     *
     * @param account
     * @param password
     * @return
     */
    SysUsers findUser(String account, String password);

    /**
     * 注册用户
     *
     * @param userInfo
     */
    void insertUser(RegisterUser userInfo);

    /**
     * 根据id查询用户
     * @param account
     * @return
     */
    String findUserById(String account);

    /**
     * 根据id删除用农户
     * @param account
     * @return
     */
    int delUserById(String account);

    /**
     * 根据id修改用户
     * @param updateUserParam
     * @return
     */
    int updateUser(UpdateUserParam updateUserParam);

    int addDataUser(RegisterUser listData);
}
